package projorientado.ocr;

/**
 * Representa um caractere reconhecido e um valor de custo associado.
 */
public class RecognizedChar implements Comparable {

    private float cost;
    private char charValue;

    public RecognizedChar(float cost, char charValue) {
        this.cost = cost;
        this.charValue = charValue;
    }

    public RecognizedChar() {
        
    }

    public float getCost() {
        return cost;
    }

    public void setCost(float cost) {
        this.cost = cost;
    }

    public char getCharValue() {
        return charValue;
    }

    public void setCharValue(char charValue) {
        this.charValue = charValue;
    }

    public int compareTo(Object o) {
        return Float.compare(cost,((RecognizedChar)o).cost);
    }    
}
